home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
MRAC
/
Lengths
/
Modify
/
l-rest-revert-range
< prev
next >
Wrap
Lisp/Scheme
|
1998-08-11
|
607b
|
22 lines
l-rest-revert-range range pattern
0-based
This function enables rest-lengths to be changed to note-lengths over a specified range.
(l-rest-revert-range '(3 5) (qlength '20-11000))
=> (1/20 1/20 -1/20 1/20 1/20)
(setq len (qlength '((20-10101) (12-101 8-11) (20-11000) (8-0010))))
(setq range
(pick-rnd1 .23 :content 2
(g-integer 0 (l-count :all :content len))))
=> ((2 5) (1 4) (0 3) (4 1))
internally to: ((2 5) (1 4) (0 3) (1 4))
(l-rest-revert-range range len)
=> ((1/20 -1/20 1/20 1/20 1/20) (1/12 1/12 1/12 1/8 1/8)
(1/20 1/20 1/20 -1/20 -1/20) (-1/8 1/8 1/8 1/8))